home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / bor_ti.exe / TI1160.ASC < prev    next >
Encoding:
Text File  |  1992-12-03  |  20.1 KB  |  793 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  9.   VERSION  :  3.1
  10.        OS  :  DOS
  11.      DATE  :  December 3, 1992                        PAGE  :  1/12
  12.  
  13.     TITLE  :  Dynamically modifying Turbo Vision menus.
  14.  
  15.  
  16.  
  17.  
  18.        This document provides source code to an example which
  19.   dynamically modifies menus using Turbo Vision for C++.
  20.  
  21.  
  22.   /***********************************************************************
  23.    *                                                                     *
  24.    * MMENU.CPP                                                           *
  25.    *   This module contains the code to support the TMultiMenu class.    *
  26.    *                                                                     *
  27.    ***********************************************************************/
  28.  
  29.   #define Uses_TEvent
  30.   #define Uses_TMenu
  31.   #define Uses_TSubMenu
  32.   #define Uses_TMenuItem
  33.   #define Uses_TMenuBar
  34.   #include <tv.h>
  35.  
  36.   #if !defined( __MMENU_H )
  37.   #include "mmenu.h"
  38.   #endif
  39.  
  40.  
  41.   /***********************************************************************
  42.    * global operator +
  43.    *
  44.    * Since the objects will always be in a linked list, and the operator+
  45.    * is processd left-to-right, we will define the function as appending
  46.    * menuItem2 to menuItem1, and then return menuItem1.
  47.    ***********************************************************************/
  48.  
  49.   TMenuItem& operator +( TMenuItem& menuItem1, TMenuItem& menuItem2 )
  50.   {
  51.       TMenuItem *p = &menuItem1;
  52.       while( p->next != NULL )
  53.           p = p->next;
  54.       p->next = &menuItem2;
  55.       return menuItem1;
  56.   }
  57.  
  58.  
  59.   /***********************************************************************
  60.    *                                                                     *
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  75.   VERSION  :  3.1
  76.        OS  :  DOS
  77.      DATE  :  December 3, 1992                        PAGE  :  2/12
  78.  
  79.     TITLE  :  Dynamically modifying Turbo Vision menus.
  80.  
  81.  
  82.  
  83.  
  84.    * class TTestList                                                     *
  85.    *                                                                     *
  86.    ***********************************************************************
  87.    * TMultiMenu::TMultiMenu
  88.    *   Constructor for a TMultiMenu object.  This version takes an array
  89.    *   of TMenu pointers.
  90.    ***********************************************************************/
  91.  
  92.   TMultiMenu::TMultiMenu( const TRect& bounds, TMenu *aMenu[],
  93.               int nMenus ) :    TMenuBar( bounds, aMenu[0] ),
  94.               mList( new TMenu *[nMenus] )
  95.   {
  96.       if( nMenus == 0)
  97.           for( nMenus = 0; aMenu[nMenus] != NULL; nMenus++ )
  98.               ;
  99.       numMenus = nMenus;
  100.  
  101.       for( int i = 0; i < nMenus; i++ )
  102.           mList[i] = aMenu[i];
  103.   }
  104.  
  105.  
  106.   /***********************************************************************
  107.    * TMultiMenu::TMultiMenu
  108.    *   Constructor for a TMultiMenu object.  This version takes an array
  109.    *   of TSubMenu objects.
  110.    ***********************************************************************/
  111.  
  112.   TMultiMenu::TMultiMenu( const TRect& bounds, TSubMenu aMenu[],
  113.                           int nMenus ) :
  114.       TMenuBar( bounds, aMenu[0] ),
  115.       numMenus( nMenus ),
  116.       mList( new TMenu *[nMenus] )
  117.   {
  118.       mList[0] = menu;                  // First menu is already allocated.
  119.       for( int i = 1; i < nMenus; i++ )
  120.           mList[i] = new TMenu( aMenu[i] );
  121.   }
  122.  
  123.  
  124.   /***********************************************************************
  125.    * TMultiMenu::~TMultiMenu
  126.    *   Destructor for a TMultiMenu object.  Destroys any stored menus
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  141.   VERSION  :  3.1
  142.        OS  :  DOS
  143.      DATE  :  December 3, 1992                        PAGE  :  3/12
  144.  
  145.     TITLE  :  Dynamically modifying Turbo Vision menus.
  146.  
  147.  
  148.  
  149.  
  150.    *   except for the current one (which will be destroyed by ~TMenuBar)
  151.    *   and frees the space where the list was stored.
  152.    ***********************************************************************/
  153.  
  154.   TMultiMenu::~TMultiMenu()
  155.   {
  156.       for( int i = 0; i < numMenus; i++ )
  157.           if( mList[i] != menu )          // Delete all but current menu.
  158.               delete mList[i];
  159.  
  160.       delete [] mList;
  161.   }
  162.  
  163.  
  164.   /***********************************************************************
  165.    * TMultiMenu::handleEvent
  166.    *   Code to respond to the cmMMChangeMenu broadcast message.  The
  167.    *   data the arrives with this message specifies which menu to switch
  168.    *   to, passed via the infoInt data member of TEvent.
  169.    ***********************************************************************/
  170.  
  171.   void TMultiMenu::handleEvent( TEvent& event )
  172.   {
  173.       if( event.what == evBroadcast &&
  174.           event.message.command == cmMMChangeMenu )
  175.       {
  176.           if( event.message.infoInt >= 0 &&
  177.               event.message.infoInt < numMenus )
  178.           {
  179.               if( menu != mList[ event.message.infoInt ] )
  180.               {
  181.                   menu = mList[ event.message.infoInt ];
  182.                   drawView();
  183.               }
  184.           }
  185.           clearEvent( event );
  186.       }
  187.       else
  188.           TMenuBar::handleEvent( event );
  189.   }
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  207.   VERSION  :  3.1
  208.        OS  :  DOS
  209.      DATE  :  December 3, 1992                        PAGE  :  4/12
  210.  
  211.     TITLE  :  Dynamically modifying Turbo Vision menus.
  212.  
  213.  
  214.  
  215.  
  216.   /***********************************************************************
  217.    *                                                                     *
  218.    * TEST.CPP                                                            *
  219.    *   This module contains the Turbo Vision application code to run     *
  220.    *   this example.  It sets up the necessary menus to bring up the     *
  221.    *   test module represented by this demo.                             *
  222.    *                                                                     *
  223.    * TEST MODULE for Multiple Menu Bar Demo.                             *
  224.    *                                                                     *
  225.    ***********************************************************************
  226.    *                                                                     *
  227.    * This code was written by Borland Technical Support.                 *
  228.    * It is provided as is with no warranties expressed or implied.       *
  229.    *                                                                     *
  230.    ***********************************************************************/
  231.  
  232.   #define Uses_TRect
  233.   #define Uses_TKeys
  234.   #define Uses_TEvent
  235.   #define Uses_TDialog
  236.   #define Uses_TMenu
  237.   #define Uses_TMenuItem
  238.   #define Uses_TMenuBar
  239.   #define Uses_TDeskTop
  240.   #define Uses_TProgram
  241.   #define Uses_TApplication
  242.   #include <tv.h>
  243.  
  244.   #pragma hdrstop
  245.  
  246.   #if !defined( __CMDS_H )
  247.   #include "cmds.h"
  248.   #endif
  249.  
  250.   #if !defined( __MMENU_H )
  251.   #include "mmenu.h"
  252.   #endif
  253.  
  254.  
  255.   /***********************************************************************
  256.    *
  257.    * Application object for demo.
  258.    *
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  273.   VERSION  :  3.1
  274.        OS  :  DOS
  275.      DATE  :  December 3, 1992                        PAGE  :  5/12
  276.  
  277.     TITLE  :  Dynamically modifying Turbo Vision menus.
  278.  
  279.  
  280.  
  281.  
  282.    ***********************************************************************/
  283.   class TTestApp : public TApplication
  284.   {
  285.  
  286.   public:
  287.  
  288.       TTestApp();
  289.       static TMenuBar *initMenuBar( TRect r );
  290.       virtual void handleEvent( TEvent& event );
  291.  
  292.   protected:
  293.  
  294.       int curMenu;
  295.  
  296.   };
  297.  
  298.  
  299.   /***********************************************************************
  300.    *
  301.    * TTestApp::TTestApp()
  302.    *
  303.    * Application object contructor.
  304.    *
  305.    ***********************************************************************/
  306.   TTestApp::TTestApp() :
  307.       TApplication(),
  308.       TProgInit( initStatusLine, initMenuBar, initDeskTop ),
  309.       curMenu( 0 )
  310.   {
  311.   }
  312.  
  313.  
  314.   /***********************************************************************
  315.    *
  316.    * TTestApp::initMenuBar( TRect r )
  317.    *
  318.    * Build several menus and pass them in an array to the TMultiMenu
  319.    * constructor.
  320.    *
  321.    ***********************************************************************/
  322.   TMenuBar *TTestApp::initMenuBar( TRect r )
  323.   {
  324.       r.b.y = r.a.y + 1;
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  339.   VERSION  :  3.1
  340.        OS  :  DOS
  341.      DATE  :  December 3, 1992                        PAGE  :  6/12
  342.  
  343.     TITLE  :  Dynamically modifying Turbo Vision menus.
  344.  
  345.  
  346.  
  347.  
  348.       TMenu *M[] =
  349.       {
  350.                       /*  Menu Number One  */
  351.           new TMenu(
  352.             *new TMenuItem( "~N~ext menu", cmCycle, kbAltN ) +
  353.             *new TMenuItem( "~M~enu One", kbAltM, new TMenu(
  354.               *new TMenuItem( "~O~ne", cmOne, kbAltO ) +
  355.               *new TMenuItem( "~T~wo", cmTwo, kbAltT ) +
  356.               *new TMenuItem( "T~h~ree", cmThree, kbAltH )
  357.               )) +
  358.             *new TMenuItem( "~F~ile", kbAltF, new TMenu(
  359.               *new TMenuItem( "~N~ew", cmNothing, kbAltN ) +
  360.               *new TMenuItem( "~O~pen", cmNothing, kbAltO ) +
  361.               *new TMenuItem( "~S~ave", cmNothing, kbAltS ) +
  362.               *new TMenuItem( "S~a~ve all", cmNothing, kbAltA )
  363.               ))
  364.             ),
  365.                       /*  Menu Number Two  */
  366.           new TMenu(
  367.             *new TMenuItem( "~N~ext menu", cmCycle, kbAltN ) +
  368.             *new TMenuItem( "~M~enu Two", kbAltM, new TMenu(
  369.               *new TMenuItem( "~O~ne", cmOne, kbAltO ) +
  370.               *new TMenuItem( "~T~wo", cmTwo, kbAltT ) +
  371.               *new TMenuItem( "T~h~ree", cmThree, kbAltH )
  372.               )) +
  373.             *new TMenuItem( "~E~dit", kbAltE, new TMenu(
  374.               *new TMenuItem( "Cu~t~", cmNothing, kbAltT ) +
  375.               *new TMenuItem( "~C~opy", cmNothing, kbAltC ) +
  376.               *new TMenuItem( "~P~aste", cmNothing, kbAltP )
  377.               ))
  378.             ),
  379.                       /*  Menu Number Three  */
  380.           new TMenu(
  381.             *new TMenuItem( "~N~ext menu", cmCycle, kbAltN ) +
  382.             *new TMenuItem( "~M~enu Three", kbAltM, new TMenu(
  383.               *new TMenuItem( "~O~ne", cmOne, kbAltO ) +
  384.               *new TMenuItem( "~T~wo", cmTwo, kbAltT ) +
  385.               *new TMenuItem( "T~h~ree", cmThree, kbAltH )
  386.               )) +
  387.             *new TMenuItem( "~C~ompile", kbAltC, new TMenu(
  388.               *new TMenuItem( "~C~ompile", cmNothing, kbAltO ) +
  389.               *new TMenuItem( "~M~ake", cmNothing, kbAltT ) +
  390.               *new TMenuItem( "~L~ink", cmNothing, kbAltH ) +
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  405.   VERSION  :  3.1
  406.        OS  :  DOS
  407.      DATE  :  December 3, 1992                        PAGE  :  7/12
  408.  
  409.     TITLE  :  Dynamically modifying Turbo Vision menus.
  410.  
  411.  
  412.  
  413.  
  414.               *new TMenuItem( "~B~uild All", cmNothing, kbAltH )
  415.               ))
  416.             ),
  417.                       /*  END of Menu List Marker (NULL)  */
  418.           0
  419.       };
  420.       return new TMultiMenu( r, M );
  421.   }
  422.  
  423.  
  424.   /***********************************************************************
  425.    *
  426.    * TTestApp::handleEvent( TEvent& event )
  427.    *
  428.    * Send appropriate messages to the new multi menu object in response
  429.    * to commands generated by the current menu.  The menu bar will switch
  430.    * to a new setting automatically upon receiving the correct message.
  431.    *
  432.    ***********************************************************************/
  433.   void TTestApp::handleEvent( TEvent& event )
  434.   {
  435.       if( event.what == evCommand &&
  436.           event.message.command >= cmOne &&
  437.           event.message.command <= cmThree
  438.         )
  439.       {
  440.           curMenu = (event.message.command - cmOne) % 3;
  441.  
  442.           message( TProgram::menuBar, evBroadcast, cmMMChangeMenu,
  443.                    (void *) curMenu
  444.                  );
  445.           clearEvent( event );
  446.       }
  447.       else if( event.what == evCommand && event.message.command == cmCycle )
  448.       {
  449.           curMenu = (curMenu + 1) % 3;
  450.           message( TProgram::menuBar, evBroadcast, cmMMChangeMenu,
  451.                    (void *) curMenu
  452.                  );
  453.           clearEvent( event );
  454.       }
  455.       else
  456.           TApplication::handleEvent( event );
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  471.   VERSION  :  3.1
  472.        OS  :  DOS
  473.      DATE  :  December 3, 1992                        PAGE  :  8/12
  474.  
  475.     TITLE  :  Dynamically modifying Turbo Vision menus.
  476.  
  477.  
  478.  
  479.  
  480.   }
  481.  
  482.  
  483.   /***********************************************************************
  484.    *
  485.    * main()
  486.    *
  487.    ***********************************************************************/
  488.   int main()
  489.   {
  490.       TTestApp TB;
  491.       TB.run();
  492.       return 0;
  493.   }
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.   /***********************************************************************
  505.    *                                                                     *
  506.    * CMDS.H                                                              *
  507.    *   This header contains various commands used in the main message    *
  508.    *   system (including the menu bar, status line, and miscellaneous    *
  509.    *   dialog boxes.)                                                    *
  510.    *                                                                     *
  511.    * HEADER FILE for Multiple Menu Bar Demo                              *
  512.    *                                                                     *
  513.    ***********************************************************************
  514.    *                                                                     *
  515.    * This code was written by Borland Technical Support.                 *
  516.    * It is provided as is with no warranties expressed or implied.       *
  517.    *                                                                     *
  518.    ***********************************************************************/
  519.  
  520.   #ifndef _CMDS_H
  521.   #define _CMDS_H
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  537.   VERSION  :  3.1
  538.        OS  :  DOS
  539.      DATE  :  December 3, 1992                        PAGE  :  9/12
  540.  
  541.     TITLE  :  Dynamically modifying Turbo Vision menus.
  542.  
  543.  
  544.  
  545.  
  546.   const unsigned cmOne     = 100;
  547.   const unsigned cmTwo     = 101;
  548.   const unsigned cmThree   = 102;
  549.   const unsigned cmCycle   = 110;
  550.   const unsigned cmNothing = 111;
  551.  
  552.   #endif
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.   /***********************************************************************
  564.    *                                                                     *
  565.    * MMENU.H                                                             *
  566.    *   This module contains the class definitions for the MMENU.CPP      *
  567.    *   source module.                                                    *
  568.    *                                                                     *
  569.    * Classes:                                                            *
  570.    *   TMultiMenu         New object derived from TMenuBar to support    *
  571.    *                      dynamic changing of menus.                     *
  572.    *                                                                     *
  573.    *   TMenuItem& operator+( TMenuItem& one, TMenuItem& two )            *
  574.    *                      Operator that links two TMenuItems together    *
  575.    *                                                                     *
  576.    ***********************************************************************
  577.    *                                                                     *
  578.    * This code was written by Borland Technical Support.                 *
  579.    * It is provided as is with no warranties expressed or implied.       *
  580.    *                                                                     *
  581.    ***********************************************************************/
  582.  
  583.   /*
  584.    * class TMultiMenu - A new menubar that supports dynamic changing of menus
  585.    *   via the messaging system.
  586.    *
  587.    * When the TMultiMenu object is created, an array of TMenu or TSubMenu
  588.    * objects is passed to the constructor.  At runtime, any of these menus can
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  603.   VERSION  :  3.1
  604.        OS  :  DOS
  605.      DATE  :  December 3, 1992                       PAGE  :  10/12
  606.  
  607.     TITLE  :  Dynamically modifying Turbo Vision menus.
  608.  
  609.  
  610.  
  611.  
  612.    * be selected by sending a broadcast message to the menubar.  The following
  613.    * parameters for the message function should be used for this object.
  614.    *
  615.    * message( TView *receiver, ushort what, ushort command, void *infoPtr )
  616.    *
  617.    *   receiver = pointer to menubar object or its owner.  The system menubar
  618.    *     is accessible via the static variable TProgram::menubar.
  619.    *
  620.    *   what = evBroadcast.
  621.    *
  622.    *   command =
  623.    *     cmMMChangeMenu : This command selects the menu whose number was
  624.    *       passed in the infoPtr member.  This number is an unsigned integer.
  625.    *
  626.    *   infoPtr = Depends on command issued.  See particular command for
  627.    *     details
  628.    *
  629.    * Example:
  630.    *
  631.    *   message( TProgram::menubar, evBroadcast, cmMMChangeMenu, (void *) 3 )
  632.    *
  633.    * This example would select menu number 3 for the system menubar.  If
  634.    * there are not three menus, the message is ignored and the menu is
  635.    * unchanged.
  636.    *
  637.    * The TMultiMenu constructors are very similar to the TMenuBar constructors
  638.    * except that instead of taking a single TMenu pointer or a single TSubMenu
  639.    * reference, they take an array of either of these.  (See below.)  When
  640.    * using the form that takes a TMenu *[], the last member of the array
  641.    * should be a NULL when taking advantage of the default argument for the
  642.    * third parameter which represents the number of menus supported.
  643.    *
  644.    * The last component of this file is an overloaded operator that can
  645.    * link two TMenuItem objects together.  This operator has been used to
  646.    * make the example code in the test module much easier to read.
  647.    */
  648.  
  649.   class TMultiMenu : public TMenuBar
  650.   {
  651.  
  652.   public:
  653.  
  654.       TMultiMenu( const TRect& bounds, TMenu *aMenu[], int nMenus = 0 );
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  669.   VERSION  :  3.1
  670.        OS  :  DOS
  671.      DATE  :  December 3, 1992                       PAGE  :  11/12
  672.  
  673.     TITLE  :  Dynamically modifying Turbo Vision menus.
  674.  
  675.  
  676.  
  677.  
  678.       TMultiMenu( const TRect& bounds, TSubMenu aMenu[], int nMenus );
  679.       ~TMultiMenu();
  680.  
  681.       virtual void handleEvent( TEvent& event );
  682.  
  683.   protected:
  684.  
  685.       TMenu **mList;
  686.       int numMenus;
  687.  
  688.   };
  689.  
  690.   const unsigned cmMMChangeMenu = 0x1600;
  691.  
  692.   TMenuItem& operator +( TMenuItem& menu1, TMenuItem& menu2 );
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.   #
  703.   # Makefile for Turbo Vision demo applications
  704.   #
  705.   # Written by Borland Tech Support, 1992.
  706.   #
  707.   .AUTODEPEND
  708.  
  709.   INCDIR = c:\borlandc\include;c:\borlandc\tvision\include
  710.   LIBDIR = c:\borlandc\lib;c:\borlandc\tvision\lib
  711.  
  712.   NAME = mmenu
  713.   OBJS = test.obj $(NAME).obj
  714.  
  715.   CFLAGS = -c -ml -O2 -I$(INCDIR) -L$(LIBDIR)
  716.  
  717.  
  718.   .cpp.obj:
  719.       bcc +$(NAME).cfg {$*.cpp }
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.   PRODUCT  :  Borland C++                           NUMBER  :  1160
  735.   VERSION  :  3.1
  736.        OS  :  DOS
  737.      DATE  :  December 3, 1992                       PAGE  :  12/12
  738.  
  739.     TITLE  :  Dynamically modifying Turbo Vision menus.
  740.  
  741.  
  742.  
  743.  
  744.   # MMENU.EXE
  745.  
  746.   $(NAME).exe: $(NAME).cfg $(OBJS)
  747.       tlink @&&~
  748.   /c /x /L$(LIBDIR) c0l.obj + $(OBJS)
  749.   $(NAME).exe
  750.   $(NAME).map
  751.   tv.lib + cl.lib
  752.   ~
  753.  
  754.  
  755.   # MMENU.CFG
  756.  
  757.   $(NAME).cfg: makefile
  758.       copy &&~
  759.   $(CFLAGS)
  760.   ~ $(NAME).cfg
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.   DISCLAIMER: You have the right to use this technical information subject to
  768.   the terms of the No-Nonsense License Statement that you received with the
  769.   Borland product to which this information pertains.
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.